<template>
  <div>
    <!--  default-active :　默认选中的菜单
            :router="true" true表示开启路由模式,开启之后, index值代表的就是路由地址
    -->
    <el-menu
      :router="true"
      :default-active="$route.path"
      class="el-menu-vertical-demo"
      background-color="#545c64"
      text-color="#fff"
      active-text-color="#ffd04b"
    >
      <el-menu-item-group>
        <span slot="title" class="span-font-size">统计分析</span>
        <el-menu-item index="/statistics/business">
          <i class="el-icon-s-home"></i>
          <span slot="title">交易统计</span>
        </el-menu-item>
        <el-menu-item index="/statistics/flow">
          <i class="el-icon-user-solid"></i>
          <span slot="title">流量统计</span>
        </el-menu-item>
        <el-menu-item index="/statistics/goodsStat">
          <i class="el-icon-s-cooperation"></i>
          <span slot="title">商品统计</span>
        </el-menu-item>
        <el-menu-item index="/statistics/vIP">
          <i class="el-icon-s-goods"></i>
          <span slot="title">会员统计</span>
        </el-menu-item>
        <el-menu-item index="/statistics/search">
          <i class="el-icon-user"></i>
          <span slot="title">搜索统计</span>
        </el-menu-item>
      </el-menu-item-group>
    </el-menu>
  </div>
</template>


<style scoped>
.span-font-size {
  font-size: 16px;
}
.el-menu {
  border-right: none;
}
</style>